package com.xjtu.project.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.xjtu.project.model.domain.Category;
import com.xjtu.project.model.domain.Shoe;
import com.xjtu.project.model.dto.CategoryDTO;
import com.xjtu.project.service.CategoryService;
import com.xjtu.project.mapper.CategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86185
* @description 针对表【category】的数据库操作Service实现
* @createDate 2025-07-04 17:49:12
*/
@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category>
    implements CategoryService{

    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public Page<Category> selectPagedMy(CategoryDTO cat) {
        Page<Category> page = new Page<>(cat.getPageNo(), cat.getPageSize());
        Page<Category> page1 = lambdaQuery().like(cat.getCategoryName() != null,
                Category::getCategoryName, cat.getCategoryName()).page(page);
        return page1;
    }
}




